<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets">

    <p:commandLink action="#{resourcesView.refreshTree}" process="@this" update="resourceTree resourceActions"
            style="float: right;margin-right: 5px;margin-top: 28px;" title="Refresh">
        <h:graphicImage library="images" name="reset-16.png" />
    </p:commandLink>
    <p:tree id="resourceTree" value="#{resourcesView.treeRoot}" var="res" dynamic="true" cache="true" animate="true"
            selectionMode="single" selection="#{resourcesView.selectedNode}">
        <p:ajax event="select" process="@this" update=":#{p:component('resourceActions')}" />

        <p:treeNode type="project" icon="ui-icon-project" styleClass="firstLevel">
            <h:outputText value="#{res.name}"/>
        </p:treeNode>

        <p:treeNode type="folder" icon="ui-icon-folder">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="src-folder" icon="ui-icon-src-folder">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="package" icon="ui-icon-package">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="java-file" icon="ui-icon-java-file">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="xml-file" icon="ui-icon-xml-file">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="properties-file" icon="ui-icon-properties-file">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="file" icon="ui-icon-file">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="build-file" icon="ui-icon-build-file">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="plugin-xml" icon="ui-icon-plugin-xml">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="contexts-xml" icon="ui-icon-contexts-xml">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="manifest-file" icon="ui-icon-manifest-file">
            <h:outputText value="#{res}"/>
        </p:treeNode>

        <p:treeNode type="empty" icon="ui-icon-empty-tree" styleClass="firstLevel">
            <h:outputText value="#{msg['resourcesPage.resourceBrowser.tree.empty']}..." />
        </p:treeNode>
    </p:tree>
</ui:composition>